import 'package:flutter/material.dart';
import 'package:xws/utils/theme_util.dart';
import 'package:xws/widgets/app_text_field.dart';

/// 物品描述
class DesBox extends StatelessWidget {
  const DesBox({Key? key, this.initialValue, this.onChanged}) : super(key: key);

  final String? initialValue;
  final Function(String)? onChanged;

  @override
  Widget build(BuildContext context) {
    return AppTextField(
      height: 130,
      initialValue: initialValue,
      onChanged: onChanged,
      fillColor: canvas(context),
      border: const OutlineInputBorder(
        borderSide: BorderSide.none,
        borderRadius: BorderRadius.vertical(top: Radius.circular(4)),
      ),
      contentPadding: const EdgeInsets.all(20).copyWith(bottom: 0),
      hintText: '在这里输入标题和简介',
      maxLines: 50,
      maxLength: 200,
      textInputAction: TextInputAction.newline,
    );
  }
}
